<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta http-equiv="Cache-Control" content="no-siteapp"/>
		<meta name="renderer" content="webkit" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
        <meta name="description" content="PlaneUI" />
        <meta name="keywords" content="PlaneUI" />
        <title>Switch 开头按钮 - PlaneUI 组件示例</title>

        <link rel="icon" type="image/png" href="favicon.png" />
        <link rel="stylesheet" type="text/css" href="../dist/css/planeui.css" />
	</head>
	<body>
        <div class="pui-layout" style="width:95%;">
            <br/>
            <h4 class="h4">Web Components 之自定义开关按钮 Switch</h4>  
            <small>兼容情况：不支持 IE8 及以下版本</small>
            <form action="php/post.php" method="post">
                <pui-switch name="switch1" value="A,B" text="," class="pui-square pui-switch-sm"></pui-switch> 
                <pui-switch name="switch1" value="A,B" text="A,B" class="pui-square pui-switch-lg"></pui-switch>
                <div class="pui-form-group">
                    <label>是否开启缓存：</label> 
                    <pui-switch name="switch1" value="1,0" switched="1" text="YES,NO" class="pui-square">
                        <small>提示：开启缓存后，页面性能会大幅提高。</small>
                    </pui-switch>
                </div>
                <div class="pui-form-group">
                    <label>是否开启缓存：</label>
                    <pui-switch name="switch2" value="1,0" switched="1" text="是,否" disabled />
                    <!-- 没有结束标签的写法应该放在某个标签内 -->
                </div>
                <div class="pui-form-group">
                    <label>是否开启缓存：</label>
                    <pui-switch name="switch3" value="3,2,1" switched="2" text="高,中,低" /> 
                </div>
                <div class="pui-form-group">
                    <label>是否开启缓存：</label>
                    <pui-switch name="switch4" value="3,2,1" switched="2" text="高,中,低" class="pui-round" /> 
                </div>
                <div class="pui-form-group"> 
                    <label>是否开启缓存：</label>
                    <pui-switch-slide name="test-switch-slide" width="60" color="orange" on-color="green" off-color="red" class="pui-switch-slide-animation">
                        <span change="关">开</span>
                    </pui-switch-slide>
                    <pui-switch-slide name="test-switch-slide2" class="pui-round" animated="true">
                        <span change="ON" class="off">OFF</span>
                    </pui-switch-slide>
                    <pui-switch-slide name="test-switch-slide3" class="pui-square">
                        <span change="开" class="off">关</span>
                    </pui-switch-slide>
                    <pui-switch-slide name="test-switch-slide4" class="pui-square" disabled>
                        <span change="关">开</span>
                    </pui-switch-slide>
                </div>
                <div class="pui-form-group">
                    <input type="submit" name="submit" class="pui-btn pui-btn-default pui-btn-success" value="提交表单" />
                </div>
            </form> 
        </div>

        <!--[if (gte IE 9) | !(IE)]><!-->
		<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
        <!--<![endif]-->

		<!--[if lt IE 9]>
        <script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
        <script type="text/javascript" src="../dist/js/planeui.patch.ie8.js"></script>
        <![endif]-->

		<!--[if lt IE 10]>
        <script type="text/javascript" src="../dist/js/planeui.patch.ie9.js"></script>
        <![endif]-->
		<script type="text/javascript" src="../dist/js/planeui.js"></script>
    </body>
</html>